<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript" src="scripts/boot.js"></script>
	<style type="text/css">
	    .asLabel .mini-textbox-border,
	    .asLabel .mini-textbox-input,
	    .asLabel .mini-buttonedit-border,
	    .asLabel .mini-buttonedit-input,
	    .asLabel .mini-textboxlist-border
	    {
	        border:0;background:none;cursor:default;
	    }
	    .asLabel .mini-buttonedit-button,
	    .asLabel .mini-textboxlist-close
	    {
	        display:none;
	    }
	    .asLabel .mini-textboxlist-item
	    {
	        padding-right:8px;
	    }    
    </style>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;width: 100%;height: 100%">
	<fieldset style="width:95%;height:30%;margin-left: 10px">
	    <legend>调拨基本信息</legend>
		<form id="form1" method="post">
		<input name="id" class="mini-hidden" />
		<input name="recallWhId" class="mini-hidden" />
	        <div style="padding-bottom:15px;">
	            <table style="width:100%;" cellspacing="0" cellpadding="5">
	                <tr>
	                    <td style="width: 80px;">编号：</td>
	                    <td style="width:250px;">
	                    	<input id="textbox1"  name="serialNum" vtype="int" class="mini-textbox asLabel" allowInput="false" />
	                    </td>
	                	<td style="width: 80px;">标题：</td>
	                    <td style="width:150px;"><input name="title" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                </tr>
	                <tr>
	                	<td>调出仓库：</td>
	                    <td style="width:250px;"><input name="recallWhName" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                    <td>调入仓库：</td>
	                    <td style="width:150px;"><input name="callinWhName" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                </tr>
	                <tr>
	                    <td>状态：</td>
	                    <td style="width:250px;"><input name="status" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                    <td>调拨时间：</td>
	                    <td style="width:150px;"><input name="allocationTime" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                </tr>
	                <tr>
	                    <td>填单人：</td>
	                    <td><input name="writeUserName" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                    <td>审核人：</td>
	                    <td><input name="auditUserName" class="mini-textbox asLabel" style="width: 200px;" readonly/></td>
	                </tr>
	            </table>
	        </div>
    	</form>
	</fieldset>
    <div style="width:97%;height:50%;margin-left: 11px;margin-top: 5px">
	    <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
		    <table style="width:80%;">
		        <tr>
		            <td>
		                <span>入库明细</span>
		            </td>
		        </tr>
		    </table>           
		</div>
		<div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" idField="id" pageSize="20" url="allocation_detail_view.do" showPager="false" multiSelect="true">
			<div property="columns" >
				<div type="indexcolumn"></div>
				<div field="medicineSerialNum" width="25%" headerAlign="center" align="center">药品编号</div>
				<div field="medicineName" width="30%" headerAlign="center" align="center">药品名称</div>
				<div field="medicineUnit" width="20%" headerAlign="center" align="center">单位</div>
				<div field="quantity" width="25%" headerAlign="center" align="center">数量</div>
			</div>
		</div>
    </div>
    <div style="text-align:center;margin-top: 60px">
        <a class="mini-button" onclick="onCancel" style="width:100px;">关闭</a>
    </div>

<script type="text/javascript">
	mini.parse();
	var grid = mini.get("datagrid1");
	
	var form = new mini.Form("#form1");
	var id = mini.getbyName("id");
	
	//标准方法接口定义
    function SetData(data) {
        if (data.action == "viewDetail") {
            //跨页面传递的数据对象，克隆后才可以安全使用
            data = mini.clone(data);
            form.setData(data.row);
        	grid.load({allocationId: data.row.id});
            form.setChanged(false);
        }
    }
	
    function CloseWindow(action) {            
        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
        else window.close();            
    }
    
    function onCancel(e) {
        CloseWindow("cancel");
    }

</script>
</body>
</html>